<template>
	<view class="body-all">
		<view class="head-card">
			<image src="@/static/images/user/userHead.jpg" mode="" class="me-avator"></image>
			<view class="name-box">
				<span style="font-weight: 700;">张三</span>
				<span>191411110000</span>
				<span style="font-size: 13px;">已累计学习16小时</span>
			</view>
		</view>
		<template v-for="(item, index) in ChangeDatas" :key="item.index">
			<view class="title-sub-box" @click="setProblemSub(item.change, item.route, item.name)">
				<view class="title-sub-text">{{ item.name }}</view>
				<image src="@/static/images/user/go-right.png" v-if="item.change == 1" class="go-right" mode="aspectFill"></image>
				<view class="no-change-text" v-if="item.change == 2">暂不可用</view>
			</view>
		</template>
	</view>
</template>

<script setup>
import { ref, reactive, computed, nextTick, watch, watchEffect, onMounted } from 'vue';
const ChangeDatas = reactive([
	{
		name: '个人设置',
		change: 1,
		route: 'me-settings'
	},
	{
		name: '我的预约',
		change: 1,
		route:'my-order'

	},
	{
		name: '我的积分',
		change: 2
	},
	{
		name: '使用规则',
		change: 1,
		route:'use-rule'
	},
	{
		name: '意见反馈',
		change: 1,
		route:'my-opinion'
	},
	{
		name: '关于我们',
		change: 1,
		route: 'it-about'

	},
]);
const setProblemSub = (change, i, name) => {
	if (change == 1) {
		uni.navigateTo({
			url: '/pages/meUser/' + i
		});
	} else if (change == 2 && name == '截止时间') {
		uni.showToast({
			title: '不能修改' + name,
			icon: 'none',
			duration: 2000
		});
	} else if (change == 2) {
		uni.showToast({
			title: '不能更改' + name,
			icon: 'none',
			duration: 2000
		});
	}
};
</script>

<style lang="scss" scoped>
@mixin flex1 {
	display: flex;
	align-items: center;
	justify-content: center;
}
@mixin flex2 {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}
@mixin font1 {
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  letter-spacing: -0.333333px;
  color: #1f2228;
}
@mixin font2 {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.333333px;
  color: #1f2228;
}
@mixin font3 {
  font-weight: 400;
  font-size: 12px;
  line-height: 17px;
  text-align: center;
  letter-spacing: -0.333333px;
  color: #9da2b1;
}
.body-all {
	min-height: 1146.5rpx;
	background: rgb(239, 242, 250);
}
.head-card {
	width: 750rpx;
	height: 230rpx;
	background: #ffffff;
	@include flex1;
	padding-left: 20rpx;
	// border-bottom: 1px solid #80ff8b;
	.name-box {
		width: 600rpx;
		height: 150rpx;
		// background-color: blue;
		@include flex2;
		margin-left: 20rpx;
	}
}
.me-avator {
	width: 150rpx;
	height: 150rpx;
	border-radius: 40%;
}
.title-sub-box {
  width: 690rpx;
  height: 100rpx;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 20rpx;
  margin-left: 30rpx;
  .title-sub-text {
    width: 576rpx;
    height: 40rpx;
    @include font2;
    text-align: left;
    margin-left: 30rpx;
  }
  .no-change-text {
    width: 110rpx;
    height: 34rpx;
    @include font3;
    margin-right: 26rpx;
  }
  .go-right {
    width: 20rpx;
    height: 24rpx;
    margin-left: 30rpx;
  }
}
</style>
